Determinant
In this section, we will introduce the concept of the determinant of a matrix. It is a scalar value that can be thought of as a geometric scaling factor. It will be helpful to first understand the determinant in the context of 2D space before we generalize it to higher dimensions. Then, we will derive a formula to find this determinant.
Table of Contents
Introduction
Imagine a 2D linear transformation that scales the
Notice that this matrix appears to scale the space up:
Next, consider a different linear transformation:
This matrix appears to scale the space down:
Is there a way to quantify how much a matrix scales space?
We can imagine placing a square in the space and observing how the matrix transforms it.
For example, the first transformation scales the square by a factor of
This factor,
However, we only know how the matrix scales this one unit square. What if we want to know how the matrix scales any shape in space?
- Since linear transformations preserve gridlines to be parallel and evenly spaced, any rectangle will get scaled by the same factor.
- Any shape can be approximated by a collection of rectangles.
Therefore, the determinant of a matrix represents how any shape in space is scaled by the matrix.
Below is a few examples of how different matrices scale space:
- Scale Up
- Scale Down
- Flip
- Shear
- Rotate
- Squish
Determinant:
This transformation scales space up by a factor of
Determinant:
This transformation scales space down by a factor of
Determinant:
This transformation does not scale space, but appears to "flip" it.
Determinant:
This shearing transformation, while it appears to distort space, does not scale it.
Determinant:
Similar to the shearing transformation, this rotation does not scale space.
In fact, all rotations have a determinant of
Determinant:
Notice that this transformation squishes space to a line.
This means that the square "collapses" to a line, which has no area, hence the determinant is
Negative Determinants
In the example above, we saw that the determinant of a matrix can be negative if it "flips" space.
We can tell whether a space is flipped by looking at the basis vectors.
Notice that in the normal case, the basis vectors are oriented in a counterclockwise direction such that
If this orientation is reversed, such that
Notice that now,
Determinants in 3D
Consider extending the concept of determinants to 3D space.
In 2D, the determinant of a matrix represented how any area in space was scaled. We considered a unit square to understand this scaling. In 3D, we can instead consider a unit cube to understand how any volume in space is scaled.
Below is a 3D transformation along with a unit cube:
Orientation of 3D Space
In 2D, we could tell whether space was flipped by whether
The convention for this is known as the right-hand rule.
Given three positively-oriented vectors
In 3D space, if you curl your fingers from
Positively Oriented
Negatively Oriented
Deriving the 2D Determinant
Now that we know what the determinant geometrically represents, we also need to be able to compute it.